#include<stdio.h>
#include<math.h>
int main(void)
{
    double a,t,n,sum=0,sum1=0;
    double i;
    scanf("%lf %lf",&a,&n);

    for(i=0.0;i<n;i++){
        t = a*pow(10.0,i);
        sum1 += t;
        sum += sum1;
    }

    printf("s = %.0lf",sum);

    return 0;


}